package app.r_teenus.backend.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "USER_ACCOUNT")
public class UserAccount implements Serializable {

	private static final long serialVersionUID = 1949104465227825890L;
	private Integer id = null;
	private String nameUser = null;
	private String passwordUser;
	private Integer subject;
	
	public UserAccount(String userName, String userPassword) {
		nameUser = userName;
		passwordUser = userPassword;
	}
	public UserAccount() {	}

	/**
	 * Gets id (primary key).
	 */
	@Id
	@Column(name = "user_account")
	@SequenceGenerator(name = "user_account_id", sequenceName = "user_account_id", allocationSize = 1)
	@GeneratedValue(generator = "user_account_id")
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "USERNAME")
	public String getNameUser() {
		return nameUser;
	}

	public void setNameUser(String nameUser) {
		this.nameUser = nameUser;
	}
	@Column(name = "PASSW")
	public String getPasswordUser() {
		return passwordUser;
	}

	public void setPasswordUser(String passwordUser) {
		this.passwordUser = passwordUser;
	}
	@Column(name = "subject_fk")
	public Integer getSubject() {
		return subject;
	}

	public void setSubject(Integer subject) {
		this.subject = subject;
	}

}
